{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 特征工程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pregnants</th>\n",
       "      <th>Plasma_glucose_concentration</th>\n",
       "      <th>blood_pressure</th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>serum_insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>Diabetes_pedigree_function</th>\n",
       "      <th>Age</th>\n",
       "      <th>Target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6</td>\n",
       "      <td>148</td>\n",
       "      <td>72</td>\n",
       "      <td>35</td>\n",
       "      <td>0</td>\n",
       "      <td>33.6</td>\n",
       "      <td>0.627</td>\n",
       "      <td>50</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>85</td>\n",
       "      <td>66</td>\n",
       "      <td>29</td>\n",
       "      <td>0</td>\n",
       "      <td>26.6</td>\n",
       "      <td>0.351</td>\n",
       "      <td>31</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8</td>\n",
       "      <td>183</td>\n",
       "      <td>64</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>23.3</td>\n",
       "      <td>0.672</td>\n",
       "      <td>32</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>89</td>\n",
       "      <td>66</td>\n",
       "      <td>23</td>\n",
       "      <td>94</td>\n",
       "      <td>28.1</td>\n",
       "      <td>0.167</td>\n",
       "      <td>21</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>137</td>\n",
       "      <td>40</td>\n",
       "      <td>35</td>\n",
       "      <td>168</td>\n",
       "      <td>43.1</td>\n",
       "      <td>2.288</td>\n",
       "      <td>33</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   pregnants  Plasma_glucose_concentration  blood_pressure  \\\n",
       "0          6                           148              72   \n",
       "1          1                            85              66   \n",
       "2          8                           183              64   \n",
       "3          1                            89              66   \n",
       "4          0                           137              40   \n",
       "\n",
       "   Triceps_skin_fold_thickness  serum_insulin   BMI  \\\n",
       "0                           35              0  33.6   \n",
       "1                           29              0  26.6   \n",
       "2                            0              0  23.3   \n",
       "3                           23             94  28.1   \n",
       "4                           35            168  43.1   \n",
       "\n",
       "   Diabetes_pedigree_function  Age  Target  \n",
       "0                       0.627   50       1  \n",
       "1                       0.351   31       0  \n",
       "2                       0.672   32       1  \n",
       "3                       0.167   21       0  \n",
       "4                       2.288   33       1  "
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"pima-indians-diabetes.csv\")\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pregnants</th>\n",
       "      <th>Plasma_glucose_concentration</th>\n",
       "      <th>blood_pressure</th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>serum_insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>Diabetes_pedigree_function</th>\n",
       "      <th>Age</th>\n",
       "      <th>Target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>3.845052</td>\n",
       "      <td>120.894531</td>\n",
       "      <td>69.105469</td>\n",
       "      <td>20.536458</td>\n",
       "      <td>79.799479</td>\n",
       "      <td>31.992578</td>\n",
       "      <td>0.471876</td>\n",
       "      <td>33.240885</td>\n",
       "      <td>0.348958</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.369578</td>\n",
       "      <td>31.972618</td>\n",
       "      <td>19.355807</td>\n",
       "      <td>15.952218</td>\n",
       "      <td>115.244002</td>\n",
       "      <td>7.884160</td>\n",
       "      <td>0.331329</td>\n",
       "      <td>11.760232</td>\n",
       "      <td>0.476951</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.078000</td>\n",
       "      <td>21.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>62.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>27.300000</td>\n",
       "      <td>0.243750</td>\n",
       "      <td>24.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>117.000000</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>23.000000</td>\n",
       "      <td>30.500000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>0.372500</td>\n",
       "      <td>29.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>6.000000</td>\n",
       "      <td>140.250000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>127.250000</td>\n",
       "      <td>36.600000</td>\n",
       "      <td>0.626250</td>\n",
       "      <td>41.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>17.000000</td>\n",
       "      <td>199.000000</td>\n",
       "      <td>122.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>846.000000</td>\n",
       "      <td>67.100000</td>\n",
       "      <td>2.420000</td>\n",
       "      <td>81.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        pregnants  Plasma_glucose_concentration  blood_pressure  \\\n",
       "count  768.000000                    768.000000      768.000000   \n",
       "mean     3.845052                    120.894531       69.105469   \n",
       "std      3.369578                     31.972618       19.355807   \n",
       "min      0.000000                      0.000000        0.000000   \n",
       "25%      1.000000                     99.000000       62.000000   \n",
       "50%      3.000000                    117.000000       72.000000   \n",
       "75%      6.000000                    140.250000       80.000000   \n",
       "max     17.000000                    199.000000      122.000000   \n",
       "\n",
       "       Triceps_skin_fold_thickness  serum_insulin         BMI  \\\n",
       "count                   768.000000     768.000000  768.000000   \n",
       "mean                     20.536458      79.799479   31.992578   \n",
       "std                      15.952218     115.244002    7.884160   \n",
       "min                       0.000000       0.000000    0.000000   \n",
       "25%                       0.000000       0.000000   27.300000   \n",
       "50%                      23.000000      30.500000   32.000000   \n",
       "75%                      32.000000     127.250000   36.600000   \n",
       "max                      99.000000     846.000000   67.100000   \n",
       "\n",
       "       Diabetes_pedigree_function         Age      Target  \n",
       "count                  768.000000  768.000000  768.000000  \n",
       "mean                     0.471876   33.240885    0.348958  \n",
       "std                      0.331329   11.760232    0.476951  \n",
       "min                      0.078000   21.000000    0.000000  \n",
       "25%                      0.243750   24.000000    0.000000  \n",
       "50%                      0.372500   29.000000    0.000000  \n",
       "75%                      0.626250   41.000000    1.000000  \n",
       "max                      2.420000   81.000000    1.000000  "
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pregnants                         0\n",
      "Plasma_glucose_concentration      5\n",
      "blood_pressure                   35\n",
      "Triceps_skin_fold_thickness     227\n",
      "serum_insulin                   374\n",
      "BMI                              11\n",
      "Diabetes_pedigree_function        0\n",
      "Age                               0\n",
      "Target                            0\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "#0值无意义的数据:Plasma_glucose_concentration,blood_pressure,Triceps_skin_fold_thickness,serum_insulin,BMI\n",
    "NaN_col_names = ['Plasma_glucose_concentration','blood_pressure','Triceps_skin_fold_thickness','serum_insulin','BMI']\n",
    "#这一步将0值设为np.NaN，以便后续处理时，不将其纳入数据处理中，比如平均值与中值等\n",
    "df[NaN_col_names] = df[NaN_col_names].replace(0, np.NaN)\n",
    "print(df.isnull().sum())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "在Pandas的DataFrame中，通过replace()函数可以很方便的将我们感兴趣的数据子集的值标记为NaN。\n",
    "\n",
    "标记完缺失值之后，可以利用isnull()函数将数据集中所有的NaN值标记为True，然后就可以得到每一列中缺失值的数量了。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>Triceps_skin_fold_thickness_Missing</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>29.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>23.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>32.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>45.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Triceps_skin_fold_thickness  Triceps_skin_fold_thickness_Missing\n",
       "0                         35.0                                    0\n",
       "1                         29.0                                    0\n",
       "2                          NaN                                    1\n",
       "3                         23.0                                    0\n",
       "4                         35.0                                    0\n",
       "5                          NaN                                    1\n",
       "6                         32.0                                    0\n",
       "7                          NaN                                    1\n",
       "8                         45.0                                    0\n",
       "9                          NaN                                    1"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#缺失值比较多，干脆就开一个新的字段，表明是缺失值还是不是缺失值\n",
    "df['Triceps_skin_fold_thickness_Missing'] = df['Triceps_skin_fold_thickness'].apply(lambda x: 1 if pd.isnull(x) else 0)\n",
    "df[['Triceps_skin_fold_thickness','Triceps_skin_fold_thickness_Missing']].head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x102b7dd8>"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEHCAYAAABBW1qbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAaV0lEQVR4nO3de5AV5Z3/8fdHLoIRRW4uMCDECxuIy6AjGqNZb7UQsiom0YJfst4wmCqSmE1kY1IpRaJVMZsE45roYrxgYlDWREXXS8SorNkojogI+KPE6E9GUBCVlUVUxu/vj36mOcKZ4QDTcwbm86o6Naeffrr7e87A+czT3adbEYGZmRnAXtUuwMzM2g+HgpmZ5RwKZmaWcyiYmVnOoWBmZrnO1S5gV/Tp0yeGDBlS7TLMzHYrzzzzzJsR0bfcvN06FIYMGUJ9fX21yzAz261I+n/NzfPuIzMzyzkUzMws51AwM7Pcbn1MwcysWj788EMaGhrYtGlTtUtpVrdu3aipqaFLly4VL+NQMDPbCQ0NDfTo0YMhQ4YgqdrlbCMiWLduHQ0NDQwdOrTi5bz7yMxsJ2zatInevXu3y0AAkETv3r13eCTjUDAz20ntNRCa7Ex9DgUzM8v5mIKZWStYt24dJ598MgCvv/46nTp1om/f7EvDCxYsoGvXrq2+zYULF7JmzRrGjh3bauvs8KFw5NRbq11Cu/HMv55d7RLMdlu9e/dm0aJFAEybNo19992Xiy++uOLlGxsb6dSp0w5tc+HChSxZsqRVQ8G7j8zMCnbqqady5JFHMmLECH79618DsHnzZnr27MkPf/hDRo8ezYIFC5g7dy7Dhg3j+OOP55vf/Cbjx48HYMOGDZx77rmMHj2aUaNGce+99/Lee+8xffp0brvtNmpra7nzzjtbpdYOP1IwMyvarFmz6NWrFxs3bqSuro4vfelL9OjRg/Xr13PEEUdwxRVXsHHjRg477DD+/O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6xExk+zeu6PKbUxSX7ID3f8BXEb2AdRkZtru7WmXTGuZD5whqbukfcluSfpfZfpMSPvnB5L9Bd6Sd4GKz4qKiLeBNyWdCiCpm6R90uy3gH8EfpJ2I7VkHnBWeu+bzjgbXO59TR/KNSmwp5KNNPZpbsWpzgC+D/yguT6tta0STwBfVqY/2ajNCuBjCrZdEbFY0k+A+ZI2k+36mEQWCNdJOo/s39KjbAmJp4EHyG7gc1lEvKHsgPN3JH0IbCA7xlDOIOBGZTvNg+x4Rmk9P5F0JXCLpLNb6TUuUHaZ5qbdZ9el4xKl/0fuBE4kO7C6nCwkWjITmCdpJZXffP4rwL+n1/cB8KWSGlcrO0B+f0uvO9V9edr2XmS7ab5ONpLY+n3tDPxO2Sm9ewFXpd1nLYqI/9xOl3K/w7Lbajp2tR1zyHZjNr33T/Hx3YrWSnzpbGt1kq4gHcCtdi2255C0b0RsSKOQp4CjI2Jtteva03ikYGa7iwfSabBdyEafDoQCeKRgVSWpnm3/OPk/EbGsXP+d3Mb1wDFbNf88Im5tpfXPJTtfv9TFETGvXP/2TtIFZN/hKDU/Ir5Vrr/tWRwKZmaW89lHZmaWcyiYmVnOoWBmZjmHgpmZ5f4/XwfQEdy55YMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x=\"Triceps_skin_fold_thickness_Missing\", hue=\"Target\",data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [],
   "source": [
    "NaN_col_names = ['Plasma_glucose_concentration','blood_pressure','Triceps_skin_fold_thickness','serum_insulin','BMI']\n",
    "NaN_col_names.remove('Triceps_skin_fold_thickness')\n",
    "for column in NaN_col_names:\n",
    "    df[column+'_Missing'] = df[column].apply(lambda x: 1 if pd.isnull(x) else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x109fcda0>"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEHCAYAAABBW1qbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAY+UlEQVR4nO3de7RcZZnn8e9DQkyASEgINOQAQUBaIkOAY2AUHJuwBEEhNJcmywsRNHYPY+M44KCjXNJ0Ny57GkUcWi6a0M1wVSQw3KMRtcUQwi0EEUQkB9CEGCIYaEh85o/9nk2Z1EkO5NSpk5zvZ61atfe73/3Wc6rOql/tS+2KzESSJIDN2l2AJGngMBQkSTVDQZJUMxQkSTVDQZJUG9ruAjbEtttum+PHj293GZK0Ubnvvvuez8yxzZZt1KEwfvx45s+f3+4yJGmjEhG/7mmZu48kSTVDQZJUMxQkSbWN+piCJLXLa6+9RldXF6+88kq7S+nR8OHD6ejoYPPNN+/1Oi0NhYh4CngRWA2syszOiBgNXAOMB54CTsjM5RERwNeAI4CVwLTMXNDK+iTpzerq6mLkyJGMHz+e6u1rYMlMli1bRldXF7vuumuv1+uP3Ud/kZkTM7OzzJ8JzMnMPYA5ZR7gA8Ae5TYduLgfapOkN+WVV15hzJgxAzIQACKCMWPGvOEtmXYcUzgamFWmZwFTGtqvyMo9wKiI2KEN9UlSrwzUQOj2ZuprdSgkcEdE3BcR00vb9pn5HEC53660jwMWN6zbVdokSf2k1Qea35OZz0bEdsCdEfHzdfRtFmlr/dhDCZfpADvvvHPfVClJG2jZsmVMnjwZgN/85jcMGTKEsWOrLw3PmzePYcOG9fljLliwgCVLlnD44Yf32ZgtDYXMfLbcL4mIG4BJwG8jYofMfK7sHlpSuncBOzWs3gE822TMS4BLADo7Ozf4F4L2P+OKDR1ik3HfVz7W7hKkjdaYMWN44IEHADjnnHPYaqutOP3003u9/urVqxkyZMgbeswFCxawcOHCPg2Flu0+iogtI2Jk9zTwfmAhMBs4qXQ7CbixTM8GPhaVA4EV3buZJGlj9qEPfYj999+fCRMmcNlllwGwatUqRo0axRe/+EUmTZrEvHnzmD17NnvuuScHH3wwn/70p5kypTrk+tJLLzFt2jQmTZrEvvvuy0033cTLL7/MjBkzuPLKK5k4cSLXX399n9Tayi2F7YEbyoGOocD/zczbIuJe4NqIOAV4Gji+9L+F6nTUJ6hOSf14C2uTpH4za9YsRo8ezcqVK+ns7OTYY49l5MiRrFixgv3224/zzjuPlStX8va3v52f/OQn7Lzzzpxwwgn1+jNmzODwww9n5syZLF++nAMOOICHHnqIs846i4ULF/LVr361z2ptWShk5pPAPk3alwGTm7QncGqr6pGkdrnggguYPXs2UH2/4Ze//CUTJ05k2LBhHHPMMQAsWrSIPffck1122QWAqVOncsUV1e7tO+64g1tvvZXzzz8fqE6Hffrpp1tSq99olqQWuuuuu7j77ru55557GDFiBAcddFD93YERI0bUp41Wn4uby0y+973vsdtuu/1J+913393n9XrtI0lqoRUrVjB69GhGjBjBI488wr333tu034QJE3jsscdYvHgxmck111xTLzvssMO48MIL6/n7778fgJEjR/Liiy/2ab2GgiS10JFHHsnKlSvZZ599mDFjBgcccEDTfltssQUXXXQRhx56KAcffDA77rgjW2+9NQBnn302K1euZO+992bChAmcc845ABxyyCE8+OCD7LvvvhvFgWZJGpS637Shuijd7bff3rTfCy+88Cfzhx56KI899hiZyac+9Sk6O6urA2255ZZceumla60/duzYPv+hMbcUJGmAuPjii5k4cSJ77bUXL7/8Mp/85Cf7vQa3FCRpgDjjjDM444wz2lqDWwqSpJqhIEmqGQqSpJqhIEmqeaBZkvpAX19xuTdXLb7ttts47bTTWL16NZ/4xCc488wz17vO+rilIEkbodWrV3Pqqady6623smjRIq666ioWLVq0weMaCpK0EZo3bx677747b3v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VZr5UPi3fDUzPzAXtrksbr4b/qTFUYf2ecnxBb4BbCmqXS6L6EtNwYJaBoD5wcznpYRjwdwbCm+OWglqmfGKb02TR5Mxc1t/1rE9E/C/g+DWar8vMv29HPQNV2dV02hrNP8nMU9tRj/qWoSBJqnn2kSSpZihIkmqGgiSpZihIkmr/H94M49psDJOSAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='Plasma_glucose_concentration_Missing', hue=\"Target\",data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1094acf8>"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEJCAYAAAB7UTvrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAWvUlEQVR4nO3dfZhedX3n8feHhJgoEQgEFxggCIiSpQQIT6sgAisIVfABha0VBMXdpS5uV1bceiGkehWqW5TiRQuiBKs8iKs8LPIgFWmtGMKDEMJSolIygCYEiGBIlfS7f9wnxzFMkiHMPfck835d11z3Ob/zO+d8Jwzzmd95TFUhSRLARr0uQJI0ehgKkqSWoSBJahkKkqSWoSBJahkKkqRWV0MhySNJ7k9yb5K5TduUJLckebj53LxpT5LzkyxIcl+SvbpZmyTpxdLN+xSSPALMrKonB7T9JfBUVZ2T5Axg86r6RJIjgY8CRwL7AV+sqv3WtP0tt9yypk2b1rX6JWlDdNdddz1ZVVMHWzZ+pIsBjgYObqZnA7cBn2jaL6tOSt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5Vzw6y3s+ramVY3AVMa843TK6qf2rav7HW71LrHUNBvbDqA7cGzg/2foc1tQ+2vXXd/69X2d9fVNWM5mvnqrqkqv6Zzi/w+4G/SHJm84t2X+BbwDHAjc02XqD5fyxJgAkDtr/qvmYP2NeuVXXWEL6PK+m8SvXy1XWoqnOADwGTgDuSvL55m9lBwGPA15J8YJBV/3XA9Ao65x/X9N9AGwhDQb2wfZIDmunjgX8csOzHwJubY9vjmuU/WEv7wUm2SLIxcOwQ9n9sko2S7ETnL/KHBulzE3BSkk0AkmybZKvmMNayqvo74PPAXk2fTavqBuBjdA43ATxCJ0Cg84rTjVdTz63Ae5Js1exrSpIdhvB9fBv4y6bWQSXZqarur6pz6Zx8fn2z7UVVdTFwCbDXEPZFVT0NPJtk/6bpuKGsp/WLVx+pFx4ETkjyt8DDwIV0jotTVU8k+STwfTp/md5QVdcArKH9LDqPV36CzqGetZ2kfYhOoLyGzvHx5Z0/5H+nqm5ujvX/qFn2HPB+YGfgc0n+Dfgt8F+AycA1zbmJAP+92czFTfscOr/4f80gqmp+kk8BNyfZqNnuqcC/rOmbaA77nNv8G6yu28eSvIXOX/vzge/S+WV+epLfNt/XYCOF1TkZuDjJr4HbgKUvYV2tB3x0tsaUJJcC11fV1b2uZX2UZJOqWnkV1RnA1lV1Wo/L0jBypCDppTiqGbGNpzOSObG35Wi4OVLQBinJn/Hi8wvfrKrP9qKedZHkx8ArVmn+46q6vxf1aGwwFCRJLa8+kiS1DAVJUstQkCS1DAVJUstQkCS1/j8H4T1oekV/uAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='blood_pressure_Missing', hue=\"Target\",data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1101c358>"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEHCAYAAABBW1qbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAaV0lEQVR4nO3de5AV5Z3/8fdHLoIRRW4uMCDECxuIy6AjGqNZb7UQsiom0YJfst4wmCqSmE1kY1IpRaJVMZsE45roYrxgYlDWREXXS8SorNkojogI+KPE6E9GUBCVlUVUxu/vj36mOcKZ4QDTcwbm86o6Naeffrr7e87A+czT3adbEYGZmRnAXtUuwMzM2g+HgpmZ5RwKZmaWcyiYmVnOoWBmZrnO1S5gV/Tp0yeGDBlS7TLMzHYrzzzzzJsR0bfcvN06FIYMGUJ9fX21yzAz261I+n/NzfPuIzMzyzkUzMws51AwM7Pcbn1MwcysWj788EMaGhrYtGlTtUtpVrdu3aipqaFLly4VL+NQMDPbCQ0NDfTo0YMhQ4YgqdrlbCMiWLduHQ0NDQwdOrTi5bz7yMxsJ2zatInevXu3y0AAkETv3r13eCTjUDAz20ntNRCa7Ex9DgUzM8v5mIKZWStYt24dJ598MgCvv/46nTp1om/f7EvDCxYsoGvXrq2+zYULF7JmzRrGjh3bauvs8KFw5NRbq11Cu/HMv55d7RLMdlu9e/dm0aJFAEybNo19992Xiy++uOLlGxsb6dSp0w5tc+HChSxZsqRVQ8G7j8zMCnbqqady5JFHMmLECH79618DsHnzZnr27MkPf/hDRo8ezYIFC5g7dy7Dhg3j+OOP55vf/Cbjx48HYMOGDZx77rmMHj2aUaNGce+99/Lee+8xffp0brvtNmpra7nzzjtbpdYOP1IwMyvarFmz6NWrFxs3bqSuro4vfelL9OjRg/Xr13PEEUdwxRVXsHHjRg477DD+/Oc/M3jwYM4666x8+enTpzN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ID3f8BXEb2AdRkZtru7WmXTGuZD5whqbukfcluSfpfZfpMSPvnB5L9Bd6Sd4GKz4qKiLeBNyWdCiCpm6R90uy3gH8EfpJ2I7VkHnBWeu+bzjgbXO59TR/KNSmwp5KNNPZpbsWpzgC+D/yguT6tta0STwBfVqY/2ajNCuBjCrZdEbFY0k+A+ZI2k+36mEQWCNdJOo/s39KjbAmJp4EHyG7gc1lEvKHsgPN3JH0IbCA7xlDOIOBGZTvNg+x4Rmk9P5F0JXCLpLNb6TUuUHaZ5qbdZ9el4xKl/0fuBE4kO7C6nCwkWjITmCdpJZXffP4rwL+n1/cB8KWSGlcrO0B+f0uvO9V9edr2XmS7ab5ONpLY+n3tDPxO2Sm9ewFXpd1nLYqI/9xOl3K/w7Lbajp2tR1zyHZjNr33T/Hx3YrWSnzpbGt1kq4gHcCtdi2255C0b0RsSKOQp4CjI2Jtteva03ikYGa7iwfSabBdyEafDoQCeKRgVSWpnm3/OPk/EbGsXP+d3Mb1wDFbNf88Im5tpfXPJTtfv9TFETGvXP/2TtIFZN/hKDU/Ir5Vrr/tWRwKZmaW89lHZmaWcyiYmVnOoWBmZjmHgpmZ5f4/XwfQEdy55YMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='Triceps_skin_fold_thickness_Missing', hue=\"Target\",data=df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1070ac50>"
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEHCAYAAABBW1qbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAb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WL1TtmZkXZ+axmTktM52/QtIB4WMf+xinnHIKU6dO5Zvf/CYAO3fuZNy4cXzxi19kxowZ3HvvvaxYsYITTjiB008/nc9//vOce+65ALz88stceOGFzJgxg5NOOokf/vCHvPLKKyxevJjvfve7dHR0cOutt/ZLrUN67iNJGgqWLl3K+PHj2bZtG52dnXziE59g7NixbN26lZNPPpkrr7ySbdu28e53v5tf/vKXHH300Zx//vnl+MWLFzNz5kxuvPFGtmzZwqmnnsrDDz/MZZddxtq1a7nmmmv6rVanuZCkml199dVMnz6d9773vXR1dfHkk08CMGrUKD7+8Y8DsG7dOk444QSOOeYYIoK5c+eW43/yk59w1VVX0dHRwRlnnMH27dvZsGFDLbU6UpCkGv30pz9l1apV3HPPPYwZM4YPfOAD5bcDY8aMKY+NNn6327fM5Ac/+AHHHnvs69pXrVrV7/U6UpCkGm3dupXx48czZswYHn30Ue67774++02dOpXHH3+cjRs3kpncfPPNZd/ZZ5/NtddeW7YffPBBAMaOHctLL73Ur/UaCpJUo49+9KNs27aN6dOns3jxYk49te8p3Q4++GCuu+46zjrrLE4//XSOPPJIDj30UAAuv/xytm3bxrRp05g6dSqLFi0C4Mwzz+Shhx7ipJNO8kazJA1WPV/a0JiU7o477uiz34svvvi67bPOOovHH3+czORzn/scnZ2dABxyyCF84xvf2O34tra2fn/RmCMFSRoklixZQkdHByeeeCKvvPIKn/3sZwe8BkcKkjRILFy4kIULF7a0BkcKkqTCUJAkFYaCJKkwFCRJhTeaJakf9PeMy83MWrxy5UouueQSuru7+cxnPsOll16635/rSEGShqDu7m4uvvhifvzjH7Nu3TqWLVvGunXr9vu8hoIkDUH33nsvxx13HO9617sYNWoUc+bM4bbbbnvzA9+EoSBJQ9DTTz/NUUe99gbj9vZ2nn766f0+r6EgSUNQX7Oq9sy4uj8MBUkagtrb29m4cWPZ7urq4sgjj9zv8xoKkjQEvec97+GJJ57g17/+NTt27GD58uWcc845+31eH0mVpH7QzCOk/WnkyJFcd911nH322XR3d3PRRRcxderU/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r9WfW+MiE9W67+JiCuqUc4jEfF7VXtbRNxZtf9dRPxrz+hE2leGgoaDMdUX8b8A3wS+tMv+5cCciGgHutn7CQGfANoi4jBgbnW+vvwxcEdmdgDTgTVABzApM/9DZk4Dvr2HY5/PzJOBJUDP5azLgZ9V7d8Hjt7LuqXdGAoaDnouH/0ejbd43RQRvacMXwn8Jxpf6Dfv42f8PY3JBE8F/mEPfe4DPh0Ri4BpmfkSjctX74qIr0XETOB3b3B+gPuBydX6B6gCKDNX8voRkLRPDAUNK5n5z8BEoK1X2w4aX7Z/AXxvH0+9nMYI5M7M/Pc9fPYq4IM07jd8JyIuyMwtNEYNdwMX0xjJ9OXfqmU3MLJa7+tdGNJ+GfnmXaQDR3U9fgSwGTi4166/BX6RmZtfP4hoTmZuiIj/Duzx5nBEHAM8nZnfiIhDgJMj4kfAjsz8XkQ8SeOdxM36R+B84CsR8QfAYXtduLQLQ0HDwZiIWFOtBzAvM7t7f/lX04Xv15Thmfl3b9LlQ8DCiHgVeBm4gMarT79dPbUEjaejmnUFsCwiPgX8AngWeGmvipZ24dTZ0hAVEW8FujNzZ0S8F1hS3cSW9pkjBWnoOhq4pRpl7AA+2+J6dABwpCA1ISK+Drx/l+avZuaeHiGVhiRDQZJU+EiqJKkwFCRJhaEgSSoMBUlS8f8B1h+Fb2A2XygAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='BMI_Missing', hue=\"Target\",data=df)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "以上缺失的数据并没有与患病有很大相关性，更像是随即缺失"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "用中值代替缺失数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pregnants                               0\n",
      "Plasma_glucose_concentration            0\n",
      "blood_pressure                          0\n",
      "Triceps_skin_fold_thickness             0\n",
      "serum_insulin                           0\n",
      "BMI                                     0\n",
      "Diabetes_pedigree_function              0\n",
      "Age                                     0\n",
      "Target                                  0\n",
      "Triceps_skin_fold_thickness_Missing     0\n",
      "Plasma_glucose_concentration_Missing    0\n",
      "blood_pressure_Missing                  0\n",
      "serum_insulin_Missing                   0\n",
      "BMI_Missing                             0\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "medians = df.median() \n",
    "df = df.fillna(medians)\n",
    "print(df.isnull().sum())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据标准化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = df['Target']  \n",
    "X_train = df.drop([\"Target\"], axis=1)\n",
    "\n",
    "feat_names = X_train.columns\n",
    "\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "ss_X = StandardScaler()#初始化标准器\n",
    "#y_train不需要标准化是么？\n",
    "#标准化是指将数据变为均值为0，方差为1的形式\n",
    "X_train = ss_X.fit_transform(X_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train = pd.DataFrame(columns = feat_names, data = X_train)\n",
    "\n",
    "train = pd.concat([X_train, y_train], axis = 1)\n",
    "\n",
    "train.to_csv('FE_pima-indians-diabetes.csv',index = False,header=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pregnants</th>\n",
       "      <th>Plasma_glucose_concentration</th>\n",
       "      <th>blood_pressure</th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>serum_insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>Diabetes_pedigree_function</th>\n",
       "      <th>Age</th>\n",
       "      <th>Triceps_skin_fold_thickness_Missing</th>\n",
       "      <th>Plasma_glucose_concentration_Missing</th>\n",
       "      <th>blood_pressure_Missing</th>\n",
       "      <th>serum_insulin_Missing</th>\n",
       "      <th>BMI_Missing</th>\n",
       "      <th>Target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.639947</td>\n",
       "      <td>0.866045</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.166619</td>\n",
       "      <td>0.468492</td>\n",
       "      <td>1.425995</td>\n",
       "      <td>-0.647760</td>\n",
       "      <td>-0.080951</td>\n",
       "      <td>-0.218515</td>\n",
       "      <td>1.026390</td>\n",
       "      <td>-0.120545</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.205066</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.852200</td>\n",
       "      <td>-0.365061</td>\n",
       "      <td>-0.190672</td>\n",
       "      <td>-0.647760</td>\n",
       "      <td>-0.080951</td>\n",
       "      <td>-0.218515</td>\n",
       "      <td>1.026390</td>\n",
       "      <td>-0.120545</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>2.016662</td>\n",
       "      <td>-0.693761</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-1.332500</td>\n",
       "      <td>0.604397</td>\n",
       "      <td>-0.105584</td>\n",
       "      <td>1.543781</td>\n",
       "      <td>-0.080951</td>\n",
       "      <td>-0.218515</td>\n",
       "      <td>1.026390</td>\n",
       "      <td>-0.120545</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.073567</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.695245</td>\n",
       "      <td>-0.540642</td>\n",
       "      <td>-0.633881</td>\n",
       "      <td>-0.920763</td>\n",
       "      <td>-1.041549</td>\n",
       "      <td>-0.647760</td>\n",
       "      <td>-0.080951</td>\n",
       "      <td>-0.218515</td>\n",
       "      <td>-0.974289</td>\n",
       "      <td>-0.120545</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>0.504422</td>\n",
       "      <td>-2.679076</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>0.316566</td>\n",
       "      <td>1.549303</td>\n",
       "      <td>5.484909</td>\n",
       "      <td>-0.020496</td>\n",
       "      <td>-0.647760</td>\n",
       "      <td>-0.080951</td>\n",
       "      <td>-0.218515</td>\n",
       "      <td>-0.974289</td>\n",
       "      <td>-0.120545</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   pregnants  Plasma_glucose_concentration  blood_pressure  \\\n",
       "0   0.639947                      0.866045       -0.031990   \n",
       "1  -0.844885                     -1.205066       -0.528319   \n",
       "2   1.233880                      2.016662       -0.693761   \n",
       "3  -0.844885                     -1.073567       -0.528319   \n",
       "4  -1.141852                      0.504422       -2.679076   \n",
       "\n",
       "   Triceps_skin_fold_thickness  serum_insulin       BMI  \\\n",
       "0                     0.670643      -0.181541  0.166619   \n",
       "1                    -0.012301      -0.181541 -0.852200   \n",
       "2                    -0.012301      -0.181541 -1.332500   \n",
       "3                    -0.695245      -0.540642 -0.633881   \n",
       "4                     0.670643       0.316566  1.549303   \n",
       "\n",
       "   Diabetes_pedigree_function       Age  Triceps_skin_fold_thickness_Missing  \\\n",
       "0                    0.468492  1.425995                            -0.647760   \n",
       "1                   -0.365061 -0.190672                            -0.647760   \n",
       "2                    0.604397 -0.105584                             1.543781   \n",
       "3                   -0.920763 -1.041549                            -0.647760   \n",
       "4                    5.484909 -0.020496                            -0.647760   \n",
       "\n",
       "   Plasma_glucose_concentration_Missing  blood_pressure_Missing  \\\n",
       "0                             -0.080951               -0.218515   \n",
       "1                             -0.080951               -0.218515   \n",
       "2                             -0.080951               -0.218515   \n",
       "3                             -0.080951               -0.218515   \n",
       "4                             -0.080951               -0.218515   \n",
       "\n",
       "   serum_insulin_Missing  BMI_Missing  Target  \n",
       "0               1.026390    -0.120545       1  \n",
       "1               1.026390    -0.120545       0  \n",
       "2               1.026390    -0.120545       1  \n",
       "3              -0.974289    -0.120545       0  \n",
       "4              -0.974289    -0.120545       1  "
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
